import React, { Component } from 'react';
import PropTypes from 'prop-types';

import styles from './style.scss';

class Loading extends Component {
    static propTypes = {
        type: PropTypes.string,
        style: PropTypes.object,
    };

    static defaultProps = {
        type: 'loader1',
    };

    render() {
        return (
            <div className={styles.globalLoading}>
                <div className={`${styles.loader} ${styles[this.props.type]}`} style={this.props.style}></div>
            </div>
        );
    }
}

export default Loading;